package trunk.model.calendar;

import java.util.Calendar;

public class Date {
	public int year, month, day, hour, minute, second;

	public Date(int year, int month, int day) {
		this.year = year;
		this.month = month;
		this.day = day;
	}
	
	public Date(int year, int month, int day, int hour, int minute, int second) {
		this.year = year;
		this.month = month;
		this.day = day;
		this.hour = hour;
		this.minute = minute;
		this.second = second;
	}
	
	public Calendar toCalendar () {
		Calendar c = Calendar.getInstance ();
		c.set ( Calendar.YEAR, year );
		c.set ( Calendar.MONTH, month - 1 );
		c.set ( Calendar.DAY_OF_MONTH, day );
		c.set ( Calendar.HOUR_OF_DAY, hour );
		c.set ( Calendar.MINUTE, minute );
		c.set ( Calendar.SECOND, second );
		return c;
	}
}